home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 351-375 / disk_359 / dice / dice.lzh / doc / dcc.doc < prev    next >
Text File  |  1990-05-20  |  6KB  |  174 lines

  1.  
  2.                 DCC.DOC
  3.  
  4.                   Matthew Dillon
  5.                   891 Regal Rd.
  6.                   Berkeley, Ca. 94708
  7.                   USA
  8.  
  9.                   uunet.uu.net!overload!dillon
  10.  
  11.  
  12.  
  13.     DCC <options and files>.
  14.  
  15.     DCC works almost exactly the same as the UNIX CC command.  For
  16.     efficiency I strongly suggest that you make DCC, C1, CPP, DAS, and
  17.     DLINK resident for best performance.  If you don't have that much
  18.     memory to waste at least make C1 and DAS resident.
  19.  
  20.     Options may occur anywhere on the command line but MUST occur singly.
  21.     That is, -c -a instead of -ca.  Any file specs may be placed right next
  22.     to the option OR with an intervening space.  -oFILE and -o FILE are
  23.     both legal.
  24.  
  25.     Files ending in .a[sm] are assumed to be assembly files.  Files ending
  26.     in .l[ib] are assumed to be library files.    Files ending in .o[bj] are
  27.     assumed to be object files.  All other files are assumed to be C source
  28.     files.
  29.  
  30.     Normally DCC compiles all C source files, assembles any .asm files, and
  31.     links the resulting object files with any specified .o files together to
  32.     produce an executable.
  33.  
  34.     Normally the -o option specified the name of the executable.  If you
  35.     tell DCC to produce only objects with -c, then -o can be used to specify
  36.     the output object file name (assuming you specified only one source
  37.     file). If you tell DCC to produce only assembly with -a, then -o can be
  38.     used to specify the output assembly file name.
  39.  
  40.     Normally DCC places objects and temporaries in T:, see options below
  41.     to overide.
  42.  
  43.     WARNING: .asm files are assembled with Das.  Das is not a real assembler.
  44.  
  45.         ------------------- options ------------------
  46.  
  47.     file    File to compile, assemble, and/or link
  48.  
  49.     @file    File containing further list of files, one per line.
  50.         (blank lines and lines beginning with ';' or '#' are
  51.         ignored.  File may NOT contain options).
  52.  
  53.     -c        Compile C source files and assemble into OBJECT files
  54.         only (do not link).
  55.  
  56.     -a        Compile C source files into ASSEMBLY files (do not assemble
  57.         or link).
  58.  
  59.         Keep in mind the DAS will do further optimizations on the
  60.         assembly file.
  61.  
  62.     -l0     Do not link default libraries (dlib:c.lib dlib:amiga.lib dlib:auto.lib), or
  63.         standard startup (dlib:c.o and dlib:x.o).
  64.  
  65.         WARNING, this is a very dangerous option.
  66.  
  67.     -1.4    Default amiga.lib is    dlib:amiga14.lib
  68.         Default amiga includes are in dinclude:amiga14/
  69.  
  70.     -1.3    Default amiga.lib is    dlib:amiga13.lib
  71.         Default amiga includes are in dinclude:amiga13/
  72.  
  73.         (If neither -1.4 or -1.3 is specified, dlib:amiga.lib
  74.         is the default amiga.lib, and the default amiga
  75.         includes are in dinclude:amiga/).
  76.  
  77.     -l lib    When linking include this library. (space is optional)
  78.  
  79.     -I0     remove default includes from search list.
  80.  
  81.     -I dir    When compiling scan this include directory (space is optional)
  82.         path takes precedence over defaults but defaults are NOT removed.
  83.  
  84.     -D define[=value]
  85.         Pre-define a symbol
  86.  
  87.     -o file    Specify output executable, object, or assembly file name
  88.         depending on what you are producing.
  89.  
  90.     -md     small data model (default)
  91.     -mD     large data model
  92.     -mc     small code model (default)
  93.     -mC     large code model
  94.  
  95.     -O outdir    Specify directory that is to contain output executable, object,
  96.         or assembly files (used when specifying multiple source files)
  97.  
  98.         -O is useful to tell the compiler where to put the objects
  99.         when you use dcc to compile and link a whole bunch of files
  100.         at once.  In this case, the -o option would be used to
  101.         specify where to put the executable.
  102.  
  103.         NOTE:    The -O name is used as a prefix so if you are
  104.         specifying a directory be sure it has a ':' or '/' on
  105.         the end.
  106.  
  107.     -T tmpdir    Specify temporary directory used to hold preprocessed source
  108.         files and temporary assembly files... files that will be
  109.         deleted after use.
  110.  
  111.         NOTE:    The -T name is used as a prefix so if you are
  112.         specifying a directory be sure it has a ':' or '/' on
  113.         the end.
  114.  
  115.     -s        Include symbolic debugging information in the executable. (dlink)
  116.  
  117.     -S        When making libraries: uses alternate section naming
  118.         conventions so BSS data is placed at the beginning of the
  119.         BSS space ... before BSS data from the main object modules
  120.         when you link.    This allows small-data libraries to be linked
  121.         into large-data programs which declare huge amounts of BSS.
  122.  
  123.     -v        Display commands as we execute them.
  124.  
  125.     -r        Make executable residentable (passed to dlink)
  126.  
  127.     -new    Checks timestamps for source/destination and only
  128.         compiles/assembles if object is outdated or does not
  129.         exist.    Used to make DCC a standalone make.
  130.  
  131.     The ENV:DCCOPTS enviroment variable may contain additional options.
  132.  
  133.  
  134.  
  135.     Example #1.  Compile hello.c to executable.  The objects will be
  136.         left in T:
  137.  
  138.     1> dcc hello.c -o ram:hello
  139.     1> ram:hello
  140.  
  141.     Example #2.  Compile hello.c to executable and put the object file
  142.         in X:
  143.  
  144.     1> dcc hello.c -o ram:hello -TX:
  145.  
  146.     Example #3.  Compile hello.c into object into RAM: then link with symbols
  147.  
  148.     1> dcc -c hello.c -o ram:hello.o
  149.     1> dcc ram:hello.o -o ram:hello -s
  150.  
  151.     Example #4.  Compile foo.c and link with an already compiled object file
  152.          gar.o to produce an executable.  foo.o is placed in
  153.          T:
  154.  
  155.     1> dcc foo.c gar.o -o ram:foogar
  156.  
  157.  
  158.                 RESIDENTABILITY
  159.  
  160.     To make a residentable executable all source modules must be compiled with
  161.     the -r option.  You must use the small-data model.    NOTE THAT NO BSS SPACE
  162.     IS ALLOCATED (the startup code c.o deals with this).  Also note that the
  163.     geta4() call will not work with residentable programs since there is no
  164.     way to get the A4 register.  The -r option effects dlink and dc1.  Since
  165.     dlink does not allow 32 bit data-data relocations the main compiler pass
  166.     will produce autoinit code for such data initializations instead of
  167.     relocated references.
  168.  
  169.                 ERROR REPORTING
  170.  
  171.     Error reporting is better now, but line numbers may not always
  172.     be correct.
  173.  
  174.